<!DOCTYPE html>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Captive</title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>


<script>

	var init = 5;
	
	$(document).ready(
		function() {
			document.getElementById("dialog").style.display="inherit";
			document.getElementById("background").style.display="inherit";
			document.getElementById("peopleimage").src="images/child.png";
			document.getElementById("dialog").innerHTML = "Jimmy says: <br/>I think he's in the room next door.";
			$("#dialog").click(dialog0);
		}
	);
	
	function dialog0()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I shout and pound on the locked door: <br/>ANYONE THERE??? LET US OUT!!!";
		document.getElementById('audiotag1').play();
		setTimeout(bind_click, 3000);
		function bind_click(){
			$("#dialog").click(dialog1);
		}
	}
	
	function dialog1()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen says through the door: <br/>What do you want?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2);
		}
	}
	
	function dialog2()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>I want to talk to you.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog3);
		}
	}
	
	function dialog3()
	{
		$("#dialog").unbind('click');
		document.getElementById("dialog").innerHTML = "(Stephen enters the room, holding a gun.)";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog4);
		}
	}
	
	function dialog4()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen says: <br/>What?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog5);
		}
	}
	
	function dialog5()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>You have the money. Now let us go.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog6);
		}
	}
	
	function dialog6()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen says mockingly: <br/>You think it's going to be this easy? Besides, I don't think your son wants to go with you.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog7);
		}
	}
	
	function dialog7()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>What do you mean?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog8);
		}
	}
	
	function dialog8()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen says mockingly: <br/>Didn't you know that this whole kidnapping was his idea?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog9);
		}
	}
	
	function dialog9()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/><div onclick=\"dialog10()\">1. (Turn to the child) What?! Is this true?</div><div onclick=\"dialog11()\">2. I don't believe you.</div>";
	}
	
	
	
	function dialog10()
	{
		window.location = "scene5-2.php";
	}
	
	function dialog11()
	{
		window.location = "scene5-3.php";
	}
	
</script>



</head>

<body>


<div id="container">
	<div id="background"><img src="images/basement.jpg" /></div>
	<div id="dialog">
	</div>
	<div id="people"><img id="peopleimage" src=""></div>
</div>
<audio id="audiotag1" src="audios/pound.mp3" preload="auto"></audio>



</body>
</html>